<h1>Listar pergunta</h1>

<table>
  <tr>
    <th>Caput</th>
    <th>Respondida</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @pergunta.each do |perguntum| %>
  <tr>
    <td><%= perguntum.caput %></td>
    <td><%= perguntum.respondida %></td>
    <td><%= link_to 'Mostrar', perguntum %></td>
	<td><%= link_to('Nova Resposta', :controller => 'resposta',
        :action => 'new', :perguntum => perguntum.id) %>
    </td>
    <td><%= link_to 'Editar', edit_perguntum_path(perguntum) %></td>
    <td><%= link_to 'Deletar', perguntum, :confirm => 'Tem certeza?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Nova Pergunta', new_perguntum_path %>

